<?php


namespace api\app\validate;


use think\Validate;

class AddressValidate extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'mobile' => 'require|mobile',
        'ssq' => 'require',
        'address' => 'require'
    ];
    protected $message = [
        'id' => 'id不能为空',
        'name.require' => '收货人姓名不能为空',
        'ssq.require' => '省市区不能为空',
        'mobile.require' => '手机号不能为空',
        'mobile.mobile' => '手机号格式不符',
        'address.require' => '详细地址不能为空',
    ];
    protected $scene = [
        'add' => ['name','mobile','ssq','address'],
        'edit' => ['id','name','mobile','ssq','address'],
    ];
}